package cn.jiyun.controller;

import cn.jiyun.dao.train.TrainDTO;
import cn.jiyun.feign.TrainFeign;
import cn.jiyun.vo.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Author 王晨
 * Date 2023/8/23
 */
@RestController
@RequestMapping("/train")
public class TrainController {
    @Autowired
    private TrainFeign trainFeign;

    @RequestMapping("/findTrainGame")//当前培训有几个课程
    public R findTrainGame(TrainDTO trainDTO){
        return trainFeign.findTrainGame(trainDTO);
    }

    @RequestMapping("/tcount")//当前登录人有几个培训
    public R tcount( TrainDTO trainDTO){
        return trainFeign.TrainCount(trainDTO);
    }

    @RequestMapping("/findCount")//培训信息
    public R findCount(){
        return trainFeign.findCount();
    }

    @RequestMapping("/findTrain")//培训信息和有多少人学
    public R findTrain(TrainDTO trainDTO){
        return trainFeign.findTrain(trainDTO);
    }

    @RequestMapping("/findTrainLogin")
    public R findTrainLogin(TrainDTO trainDTO){
        return trainFeign.findTrainLogin(trainDTO);
    }


}
